import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';


// 扫描图标
class SvgIcon {
  static Widget icon(String name,
      {double? size=32, Color? color=Colors.white}) {
    var assetName = 'assets/img/icon/svg/${name}.svg';
    return SvgPicture.asset(
      assetName,
     width: size,
     height: size,
      colorFilter:  ColorFilter.mode(color!,BlendMode.srcIn),
    );
  }
}
